package com.jlkf.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.jlkf.dao.CommonSortMapper;
import com.jlkf.service.CommonSortService;

@Service
public class CommonSortServiceImpl implements CommonSortService {
	
	@Autowired
	private CommonSortMapper commonSortMapper;

	/**
	 * 查看普通课程分类列表
	 */
	@Override
	public List<Map<String, Object>> selectCommonSortList(Map<String, Object> map) {
		return commonSortMapper.selectCommonSortList(map);
	}

	/**
	 * 删除分类
	 */
	@Override
	public int deleteSort(String id) {
		return commonSortMapper.deleteSort(id);
	}

	/**
	 * 添加一级分类
	 */
	@Override
	public int insertOneSort(String G_NAME,String G_IMG) {
		return commonSortMapper.insertOneSort(G_NAME,G_IMG);
	}

	/**
	 * 编辑分类
	 */
	@Override
	public int updateSort(Map<String, Object> map) {
		return commonSortMapper.updateSort(map);
	}

	/**
	 * 添加子分类
	 */
	@Override
	public int insertSubclass(Map<String, Object> map) {
		return commonSortMapper.insertSubclass(map);
	}
	

}
